// class ：关键字

function Person(name) {
    this.name = name
}
Person.prototype.say = function() {
    console.log(`hi, this is ${this.name}`);
}

class PersonEl {
    constructor(name) {
        this.name = name
    }
    say() {
        console.log(`hi, this is ${this.name}`);
    }
}
let foo = new Person('mmm')
console.log(foo);
foo.say()
let fo = new PersonEl('tome')
fo.say()
console.log(fo);